import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { JsonpModule,HttpModule} from '@angular/http';
import { MyApp } from './app.component';

import { MineModule } from '../pages/mine/mine.module';
import { HomeModule } from '../pages/home/home.module';
import { ClassifyModule } from '../pages/classify/classify.module';
import { ShoppingModule } from '../pages/shopping/shopping.module';
import { LoginModule } from '../pages/login/Login.module';

import { TabsPage } from '../pages/tabs/tabs';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Network } from '@ionic-native/network';
import { IonicStorageModule } from '@ionic/storage';
import { HttpService } from '../providers/HttpService';
import { NativeServiceC } from '../providers/NativeServiceC';
import { GlobalData } from '../providers/GlobalData';

@NgModule({
  declarations: [
    MyApp,
    TabsPage
  ],
  imports: [
    BrowserModule,
    HttpModule,
    JsonpModule,
    IonicModule.forRoot(MyApp,{
      mode:'ios', // android是"md" 统一为iOS平台样式
      backButtonText:'',
      tabsHideOnSubPages:true
    }),
    IonicStorageModule.forRoot(),
    //  自定义模块
    MineModule,
    HomeModule,
    ClassifyModule,
    ShoppingModule,
    LoginModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    TabsPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    Network,
    HttpService,
    NativeServiceC,
    GlobalData,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
